﻿Namespace myBookmarks.Web
    Public Class Helpers
        Private Shared ReadOnly EmailExpression As Regex = New Regex("^([0-9a-zA-Z]([-\.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$", RegexOptions.Singleline Or RegexOptions.Compiled)
        Public Shared Function IsEmail(ByVal email As String) As Boolean
            If String.IsNullOrEmpty(email) Then Return False
            Return EmailExpression.IsMatch(email)
        End Function
    End Class
End Namespace